/**
 * @type {String}
 *
 * @properties={typeid:35,uuid:"0064220C-5160-437B-A360-7E3065AC7B8C"}
 */
var fFotos = null;

/**
 * Callback method for when form is shown.
 *
 * @param {Boolean} firstShow form is shown first time after load
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"88B097AF-C2BA-46F8-8E41-0297C647530F"}
 */
function onShow(firstShow, event) {
	var tableName = 'fotos';
	var columnName = 'foto';
	var mimeType = 'image/jpeg';
	var URL = 'media:///servoy_blobloader?servername=hoteleria' 
	URL += '&tablename=' + tableName
	URL += '&dataprovider=' + columnName
	URL += '&mimetype=' + mimeType;
	
	  
/*	var $btnes = '<a href="#siguiente" class="next" title="Siguiente"></a><a href="#anterior" class="prev" title="Anterior"></a>'
	fFotos = '<html>'+
			  '<head>'+
			    '<title></title>'+
			    '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />'+
			    '<script type="text/javascript" src="jquery-2.0.3.min.js"></script>'+
			    '<script type="text/javascript" src="rotador.js"></script>'+
				'<link rel="stylesheet" href="rotador.css" media="screen" />'+
			  '</head>'+
			  '<body>'+
			      '<div class="sliderContainer">'+
			      '<div id="slider">'+
			          '<ul class="slidesContainer">'
			              for (var i = 1 ; i <= foundset.getSize() ; i++)
			              {
			            	  var $rcd = foundset.getRecord(i)
							  var $URL = URL + '&rowid1=' + $rcd.foto_id
			            	  fFotos += '<li class="slide"><img src="'+$URL+'" alt="Foto ' +i +'" />'+$btnes+'</li>'
			              }
		          	
	fFotos += '</ul> </div> </div> </body> </html>'*/
		
	fFotos = '<html>'+
	  '<head>'+
	    '<title></title>'+
	    '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />'+
	    '<script type="text/javascript" src="jquery-2.0.3.min.js"></script>'+
	    '<script type="text/javascript" src="rotador2.js"></script>'+
		'<link rel="stylesheet" href="rotador2.css" media="screen" />'+
	  '</head>'+
	  '<body>'+
	  	'<div class="divSlider">'+
		 '<div class="divSliderContenedor">'+
	      '<div class="divSliderContenido">'
	               for (var i = 1 ; i <= foundset.getSize() ; i++)
	              {
	            	  var $rcd = foundset.getRecord(i)
					  var $URL = URL + '&rowid1=' + $rcd.foto_id
					  fFotos += '<button class="bSliderBloqueBtnAnt" onclick="SliderNavegar(\'-\');"></button>'
	            	  fFotos += '<div class="divSliderBloque divSliderBloqueSi" id="slider_bloque_'+(i-1)+'">'+
	            	  				'<img class="iSliderBloque" src="'+$URL+'"/>'+
		            	  		/*	'<div class="divSliderBloqueTexto">'+
		            	  				'<a class="aSliderBloqueTexto">' +fotos_to_tipos_habitacion.descripcion_corta+' '+i+'</a>'+
		            	  			'</div>'+*/
	            	  			'</div>'
					  fFotos += '<button class="bSliderBloqueBtnSig" onclick="SliderNavegar(\'+\');"></button>'
	              }
        	
	fFotos += '</div> </div> <input type="hidden" id="slider_total" value="'+foundset.getSize()+'" /> </div> </body> </html>'
}
